<template>
  <div class="min">

    <div class="ser" v-for='(item,index) in $store.state.listArr' :key="index">
      <div class="q" :class="{active:item.status == true}">

        <span><input type="checkbox" @click='qufan(item)' :checked='item.status'></span>
        <span>{{item.id}}</span>
        <span>{{item.name}}</span>
        <span @click='clear(index)'>删除</span>
      </div>
    </div>

  </div>
</template>

<script>
export default {
  methods: {
    qufan(item) {
      this.$store.commit('fanhui', item)
    },
    clear(index) {
      this.$store.commit('clear_gogo', index);
    }
  },
}
</script>

<style lang='scss' scoped>
.min {
  width: 100%;
  height: 100%;
  margin-top: 10px;
  .ser {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .q {
    width: 90%;
    height: 30px;
    background-color: aqua;
    margin: 10px 0;
    border-radius: 10px;
    line-height: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .active {
    background-color: red;
  }
}
</style>